﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Web;

namespace Kingdee.WeksErp.Utility
{
    public class CommonHelper
    {
        public static string GetMd5(string myString)
        {
            MD5 md5 = new MD5CryptoServiceProvider();
            var fromData = System.Text.Encoding.Unicode.GetBytes(myString);
            var targetData = md5.ComputeHash(fromData);
            return targetData.Aggregate<byte, string>(null, (current, t) => current + t.ToString("x"));
        }
    }
}